<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/21
 * Time: 14:24
 */

namespace app\common\model;

use app\common\model\Base;
class Article extends Base
{
    # 开启自动写入时间戳字段,也可以在database配置文件中开启全局的配置
    protected $autoWriteTimestamp = true;

    protected $dateFormat = 'Y-m-d H:i';

    # 获取器
    public function getStatusAttr($value){
        $status = ['隐藏', '显示'];
        return $status[$value];
    }
}